//
//  NovelModel.m
//  数据库
//
//  Created by 0.0 on 15-3-31.
//  Copyright (c) 2015年 dlou. All rights reserved.
//

#import "FavoriteModel.h"

@implementation FavoriteModel

- (void)dealloc
{
    [_vegetabelId release];
    [_vegetableName release];
    [_imageURL release];
    
    [super dealloc];
}

- (instancetype)init
{
    self = [self initWithVegetableId:nil imageURL:nil vegetableName:nil];
    
    return self;
}

- (instancetype)initWithVegetableId:(NSString *)vegetableId imageURL:(NSString *)imageURL vegetableName:(NSString *)vegetableName
{
    self = [super init];
    
    if (self) {
        self.vegetabelId = vegetableId;
        self.vegetableName = vegetableName;
        self.imageURL = imageURL;
    }
    
    return self;
}

+ (FavoriteModel *)favoriteWithVegetableId:(NSString *)vegetableId imageURL:(NSString *)imageURL vegetableName:(NSString *)vegetableName
{
    FavoriteModel *model = [[FavoriteModel alloc] initWithVegetableId:vegetableId imageURL:imageURL vegetableName:vegetableName];
    
    return [model autorelease];
}



@end
